home *** CD-ROM | disk | FTP | other *** search
/ Amiga Format CD 46 / Amiga Format CD46 (1999-10-20)(Future Publishing)(GB)[!][issue 1999-12].iso / -in_the_mag- / reader_requests / scilab / demos / lmitool / normopt2.sci < prev    next >
Text File  |  1999-09-16  |  1KB  |  34 lines

  1.  function [X,c]=normopt2(sys)
  2.  // Generated by lmitool on Wed Feb 08 14:55:43 MET 1995
  3.    
  4.    Mbound = 1e3;
  5.    abstol = 1e-10;
  6.    nu = 10;
  7.    maxiters = 100;
  8.    reltol = 1e-10;
  9.    options=[Mbound,abstol,nu,maxiters,reltol];
  10.     
  11.  ///////////DEFINE INITIAL GUESS BELOW
  12.  [A,B,C,D]=abcd(sys)
  13.  X_init=eye(A);Ib=eye(B'*B);Ic=eye(C*C');                          
  14.  /////////// 
  15.   
  16.  XLIST0=list(X_init,c_init)
  17.  XLIST=lmisolver(XLIST0,normopt2_eval,options)
  18.  [X,c]=XLIST(:)
  19.   
  20.   
  21.   
  22.  /////////////////EVALUATION FUNCTION////////////////////////////
  23.   
  24.  function [LME,LMI,OBJ]=normopt2_eval(XLIST)
  25.  [X,c]=XLIST(:)
  26.   
  27.  /////////////////DEFINE LME, LMI and OBJ BELOW
  28.  LME=X'-X                                                          
  29.  LMI=-[A*X+X*A',B,X*C';B',-gama*Ib,D';C*X,D,-gama*Ic]              
  30.  //  LMI=-[A*X*E'+E*X*A',B,E*X*C';B',-gama*Ib,D';C*X*E',D,-gama*Ic]
  31.  OBJ=gama                                                          
  32.                                                                    
  33.                                                                    
  34.